package com.drojian.demo1.test6;

import android.content.Intent;
import android.os.Bundle;
import android.widget.Button;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;

import com.drojian.demo.R;

public class RootMyViewActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        EdgeToEdge.enable(this);
        setContentView(R.layout.activity_root_my_view);


        Button back = findViewById(R.id.back);

        Button view1 = findViewById(R.id.view1);
        Button view2 = findViewById(R.id.view2);
        Button view3 = findViewById(R.id.view3);
        Button view4 = findViewById(R.id.view4);
        Button view5 = findViewById(R.id.view5);

        back.setOnClickListener(v->finish());
        view1.setOnClickListener(v -> startActivity(new Intent(RootMyViewActivity.this, MyViewActivity.class)));

        view2.setOnClickListener(v -> {
            Intent intent = new Intent(RootMyViewActivity.this, MyView4Activity.class);
            startActivity(intent);
        });
        view3.setOnClickListener(v -> {
            Intent intent = new Intent(RootMyViewActivity.this,MyView2Activity .class);
            startActivity(intent);
        });
        view4.setOnClickListener(v -> {
            Intent intent = new Intent(RootMyViewActivity.this, MyView5Activity.class);
            startActivity(intent);
        });
        view5.setOnClickListener(v -> startActivity(new Intent(RootMyViewActivity.this, MyView3Activity.class)));

    }
}